<%--
  Created by IntelliJ IDEA.
  User: lyy
  Date: 2022/9/25
  Time: 15:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<% String path = request.getContextPath();%>
<c:set var="path" value="${pageContext.request.contextPath}"></c:set>

<div>
    <c:forEach items="${requestScope.positionPageInfo.list}" var="position">
    <div class="pxp-jobs-card-3 pxp-has-border">
        <div class="row align-items-center justify-content-between">
            <div class="col-sm-3 col-md-2 col-lg-3 col-xl-2 col-xxl-auto">
                <a href="/web/personal/positionDetail/${position.id}" class="pxp-jobs-card-3-company-logo" style="background-image: url(/static/web/images/company-logo-1.png);"></a>
            </div>
            <div class="col-sm-9 col-md-10 col-lg-9 col-xl-10 col-xxl-4">
                <a href="/web/personal/positionDetail/${position.id}" class="pxp-jobs-card-3-title mt-3 mt-sm-0">${position.positionName}&nbsp;&nbsp;&nbsp;</a>
                <div class="pxp-jobs-card-3-details">
                    <a href="/web/personal/positionDetail/${position.id}" class="pxp-jobs-card-3-location">
                        <span class="fa fa-globe"></span>${position.province.provName}-${position.city.cityName}
                    </a>
                    <c:if test="${position.fullTimeOn}" var="fullTime">
                        <div class="pxp-jobs-card-3-type">全职</div>
                    </c:if>
                    <c:if test="${not fullTime}">
                        <div class="pxp-jobs-card-3-type">兼职</div>
                    </c:if>
                    <div class="pxp-jobs-card-3-location" style="color: crimson;"><span class="pxp-jobs-card-3-type">薪资:</span>${position.salaryInfo}</div>
                </div>
            </div>
            <div class="col-sm-8 col-xl-6 col-xxl-4 mt-3 mt-xxl-0">
                <a href="/web/personal/positionDetail/${position.id}" class="pxp-jobs-card-3-category">
                    <div class="pxp-jobs-card-3-category-label">${position.name}</div>
                </a>
                <div class="pxp-jobs-card-3-date-company">
                    <span class="pxp-jobs-card-3-date pxp-text-light">发布时间：<fmt:formatDate value="${position.enrollTime}" pattern="yyyy-MM-dd"/></span>
                    &nbsp; <a href="#" class="pxp-jobs-card-3-company">${position.company.name}</a>
                </div>
            </div>
            <div class="col-sm-4 col-xl-2 col-xxl-auto mt-3 mt-xxl-0 pxp-text-right">
                <a href="/web/personal/positionDetail/${position.id}" class="btn rounded-pill pxp-card-btn">详情 ></a>
            </div>
        </div>
    </div>
    </c:forEach>
</div>

<div class="row mt-4 mt-lg-5 justify-content-between align-items-center">
    <div class="col-auto">
        <nav class="mt-3 mt-sm-0" aria-label="Jobs list pagination">
            <ul class="pagination pxp-pagination" style="margin-left: 330px;">
                <li class="page-item active" aria-current="page">
                    <a href="#" class="page-link preNum">上一页</a>
                </li>

                <c:forEach items="${requestScope.positionPageInfo.navigatepageNums}" var="i">
                    <c:if test="${requestScope.positionPageInfo.pageNum eq i}" var="isCur">
                        <li class="page-item active" aria-current="page">
                            <a href="#" class="page-link changeNum">${i}</a>
                        </li>
                    </c:if>
                    <c:if test="${not isCur}">
                        <li class="page-item" aria-current="page">
                            <a href="#" class="page-link changeNum">${i}</a>
                        </li>
                    </c:if>
                </c:forEach>

                    <li class="page-item active" aria-current="page">
                        <a href="#" class="page-link nextNum">下一页</a>
                    </li>
            </ul>
            <br>
            <span style="margin-left: 500px;">共 ${requestScope.positionPageInfo.total} 条 ${requestScope.positionPageInfo.pages} 页</span>
            <input type="hidden" value="${requestScope.positionPageInfo.pageNum}" class="nowPageNum">
        </nav>
    </div>
<%--    <div class="col-auto">--%>
<%--        <a href="#" class="btn rounded-pill pxp-section-cta mt-3 mt-sm-0">Show me more<span class="fa fa-angle-right"></span></a>--%>
<%--    </div>--%>
</div>
